<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/jsps/common/taglibs.jsp"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>添加基金产品</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">

	<link rel="stylesheet" type="text/css" href="<c:url value="/css/application.css"/>">
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/form.css"/>">
	
	<script type="text/javascript">
		function validateFrm(){
			with(document.forms[0]){
				if(fund_name.value == ''){
					alert("[基金名称]必须填写");
					fund_name.focus();
					return false;
				}
				if(fund_price.value == ''){
					alert("[基金单价]必须填写");
					fund_price.focus();
					return false;
				}
			}
			return true;
		}
	</script>
	<style type="text/css">
	body {
			background:url(pics/bg.jpg);
			-webkit-background-size: cover;
			-moz-background-size: cover;
			background-size: cover;
		}
</style>
  </head>
  
  <body>
    <div id="wrapper">
    	<div id="f_title">添加基金产品</div>
    	<form action="<c:url value="/fundMgr?act=create"/>" method="post" onSubmit="return validateFrm();">
    		<div class="f_row">
    			<span>基金名称:</span>
    			<input type="text" name="fund_name" size="20" value="${fund.fundName}">
    		</div>
    		<div class="f_row">
    			<span>基金单价:</span>
    			<input type="text" name="fund_price" size="20" value="${fund.fundPrice}">
    		</div>
    		<div class="f_row">
    			<span>描述说明:</span>
    			<textarea rows="3" name="fund_desc">${fund.fundDescribe}</textarea>
    		</div>
    		<div class="f_row">
    			<span>基金状态:</span>
    			<select name="fund_status">
    				<option value="O" <c:if test= "${fund.fundStatus=='O'}">selected</c:if>>开放</option>
    				<option value="C" <c:if test= "${fund.fundStatus=='C'}">selected</c:if>>封闭</option>
    			</select>
    		</div>
    		
    		<div class="f_row">
    			<br/>
    			<input type="submit" value = "添加" style="height=25px;width=50px">
    		</div>
    	</form>
    </div>
    
    <c:if test="${not empty err}">
		<script type="text/javascript">
			alert('${err}');
		</script>
	</c:if>
  </body>
</html>